<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('admin.home');
    $router->resource('news', NewsController::class);
    $router->resource('users', UsersController::class);
    $router->resource('categories', CategoryController::class);
    $router->resource('params', ParamController::class, ['except' => ['index']]);
    $router->get('params', 'ParamTreeController@index');
    $router->get('news/test/create', 'NewsController@test');
    $router->post('attachments', 'AttachmentController@upload');
    $router->resource('attachments', AttachmentController::class, ['except' => ['store']]);
    $router->resource('param-types', ParamTypeController::class);
    $router->resource('param-values', ParamValueController::class);

});
